package com.wowudi.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wowudi.domain.DrugRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;


@Mapper
public interface DrugRecordMapper extends BaseMapper<DrugRecord> {

    @Select("select * from v_drugRecord where (d_name like concat('%',#{name},'%') or pt_name like concat('%',#{name },'%') ) and dr_create_time  between #{ks} and #{js}")
    @ResultMap("DrugRecordMap")
    public Page findRecordAll(Page page ,@Param("name") String name,@Param("ks") String ks,@Param("js") String js);



}